@echo off
setlocal EnableDelayedExpansion

:: Define character set (without spaces or special characters that might cause issues)
set chars=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789

:: Initialize password variable
set password=

:: Generate 12 random characters
for /L %%i in (1,1,12) do (
    set /a rand=!random! %% 62
    call set char=%%chars:~!rand!,1%%
    set password=!password!!char!
)

:: Display result
echo Generated password: !password!
pause